package org.biojava.services.das.servlets;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.biojava.dasobert.dasregistry.DasSource;
import org.biojava.services.das.dao.DasServer;
import org.biojava.services.das.dao.DasSourceManager;
import org.biojava.services.das.dao.ServerManager;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

public class DasArchiveController extends AbstractController{
	private DasSourceManager dasSourceManager;

	
	
	public DasSourceManager getDasSourceManager() {
		return dasSourceManager;
	}

	public void setDasSourceManager(DasSourceManager dasSourceManager) {
		this.dasSourceManager = dasSourceManager;
	}

	public DasArchiveController(){
		
	}

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {
		
		List<DasSource> inactiveSources=dasSourceManager.getInactiveSources();
		
		return new ModelAndView("archiveSources","sources", inactiveSources );

	}

}
